package com.wbr.file.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wbr.file.VO.CustomerVO;
import com.wbr.file.pojo.Customer;
import com.wbr.file.service.CustomerService;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/swagger")
@Api("swagger")
public class SwaggerController {

	@Autowired
	private CustomerService service;

	@RequestMapping("/selectCustomer")
	@ApiOperation("查找用户信息")
	@ResponseBody
	public List<Customer> getCustomer(@RequestBody CustomerVO customer) {
		List<Customer> customerList = null;
		try {
			customerList = service.getCustomerList();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return customerList;
	}
}
